<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateTablePlaceholdSite extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        return ;
        Schema::create('open_shop_placeholder_location', function (Blueprint $table) {
            $table->id();

            $table->unsignedInteger('mainProcessId')->default(0)->comment('开店主流程id');
            $table->string('orderNo', 60)->default('')->comment('订单号');
            $table->string('longitude')->default('')->comment('门店经度');
            $table->string('latitude')->default('')->comment('门店纬度');
            $table->string('siteAddress', 64)->default('')->comment('经纬度地址');
            $table->unsignedInteger('provinceCode')->default(0)->comment('省code');
            $table->unsignedInteger('cityCode')->default(0)->comment('市区code');
            $table->unsignedInteger('areaCode')->default(0)->comment('地区code');
            $table->string('shopAddressPrefix', 120)->default('')->comment('门店地址前缀 - 省市区');
            $table->string('detailAddress', 120)->default('')->comment('详细地址');
            $table->unsignedInteger('placeholderTime')->default(0)->comment('预占时间');

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');

            $table->index('mainProcessId', 'idx_mainProcessId');
            $table->index('orderNo', 'idx_orderNo');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment   = '预选点位';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        return ;
        Schema::dropIfExists('open_shop_placeholder_location');
    }
}
